using System.Collections.Generic;
/*
 * @Autor: PK
 * @Date: 2020-12-25 21:19:08
 * @Description: 这个方法标注了某个类是否可以序列化，保存仿真状态的相关类都需要实现该接口，暂时没有进行保存相关的实现
 */
using System;

namespace ShkSimulation.core.util{
    
    [AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false, AllowMultiple = false)]
    public class MementoAttribute : Attribute{
        private List<string> ignoredPropertiesOrFields;
        /**
         * @param 要忽略的属性或字段
         */
        public MementoAttribute(){this.ignoredPropertiesOrFields = new List<string>();}
        public MementoAttribute(List<string> ignoredPropertiesOrFields){
            this.ignoredPropertiesOrFields = ignoredPropertiesOrFields;
        }
        public List<string> GetPropertyAndField(){
            return ignoredPropertiesOrFields ?? new List<string>();
        }
    }
}
